        <!-- banner start -->
        <div class="banner">
            <div class="banner-title">
                <h2><?=$moudle_name ?></h2>
                <!-- <p><a href="https://jqueryvalidation.org/" target="_blank">jQueryValidatio.js官方网站</a>, <a href="http://www.runoob.com/jquery/jquery-plugin-validate.html" target="_blank">中文文档</a></p> -->
            </div>
        </div>
        <!-- banner over -->
        <!-- container start -->
        <div class="container-fluid">
            <!-- row start -->
            <div class="row">
                <!-- column start -->
                <div class="col-lg-12">
                    <section class="card">
                        <div class="card-header">
                            <h3 class="title"><?=$table_name ?><small></small></h3>
                        </div>
                        <div class="card-body">
                            <!-- form start -->
                            <form class="form" id="demo" action="<?php echo base_url();?>/admin/auto_trade/update/<?=$auto_trade['id']?>" method="post">                              
                                <fieldset class="form-group">
                                    <legend class="label">账户1<span class="red">*</span></legend>
                                    <select class="select" name="auto_trade[account1_id]" id="account1_id" required>
                                    <!-- <option value="">请选择</option> -->
                                        <?php foreach($account_list as $account): ?>                                            
                                            <option value="<?php echo $account['id'] ?>" <?php echo $account['id']==$auto_trade['account1_id']?"selected":"";?> >
                                                <?php echo $account['account'] ?> 
                                            </option>
                                        <?php endforeach; ?>                                     
                                    </select>
                                </fieldset>
                                <fieldset class="form-group">
                                    <legend class="label">账户2<span class="red">*</span></legend>
                                    <select class="select" name="auto_trade[account2_id]" id="account2_id" required>
                                    <!-- <option value="">请选择</option> -->
                                        <?php foreach($account_list as $account): ?>                                            
                                            <option value="<?php echo $account['id'] ?>" <?php echo $account['id']==$auto_trade['account2_id']?"selected":"";?> >
                                                <?php echo $account['account'] ?> 
                                            </option>
                                        <?php endforeach; ?>                                     
                                    </select>
                                </fieldset>
                                <fieldset class="form-group">
                                    <legend class="label">单选框<span class="red">*</span></legend>
                                    <div class="radiocheckbox-group-horizontal">
                                        <label class="radiocheckbox-item">
                                            <input class="radiocheckbox" type="radio" name="auto_trade[trade_way]" value="ethbtc" <?php echo $auto_trade['trade_way']=='ethbtc'?"checked=checked":""; ?> >
                                            <span class="radiocheckbox-replace"></span>
                                            <p>ethbtc</p>
                                        </label>
                                        <label class="radiocheckbox-item">
                                            <input class="radiocheckbox" type="radio" name="auto_trade[trade_way]" value="btcaud" <?php echo $auto_trade['trade_way']=='btcaud'?"checked=checked":""; ?> >
                                            <span class="radiocheckbox-replace"></span>
                                            <p>btcaud</p>
                                        </label>
                                        <label class="radiocheckbox-item">
                                            <input class="radiocheckbox" type="radio" name="auto_trade[trade_way]" value="ethaud" <?php echo $auto_trade['trade_way']=='ethaud'?"checked=checked":""; ?> >
                                            <span class="radiocheckbox-replace"></span>
                                            <p>ethaud</p>
                                        </label>
                                    </div>
                                </fieldset>
                                <fieldset class="form-group">
                                    <legend class="label">交易次数<span class="red">*</span></legend>
                                    <input class="input validate-feedback" type="text" name="auto_trade[trade_num]" id="trade_num" placeholder="请输入交易次数" rangelength="1,16" value="<?php echo $auto_trade['trade_num'] ?>" required>
                                </fieldset>       
                                <div class="form-footer">
                                    <!-- <button class="button" type="submit">提交</button> -->
                                    <button class="button" type="button" id="auto_trade">提交</button>
                                </div>
                            </form>
                            <!-- form over -->
                        </div>
                    </section>
                </div>
                <!-- column over -->
            </div>
            <!-- row over -->
        </div>
        <!-- container over -->
        <div class="modal fade" id="demo-2">
            <div class="modal-dialog modal-small">
                <!-- card start -->
                <section class="card">
                    <div class="card-header">
                        <h4 class="title">自动交易<small></small></h4>
                    </div>
                    <div class="card-body">
                        <p>自动交易创建较耗时，已在后台运行！</p>
                    </div>
                    <div class="card-footer">
                        <button type="button" class="button button-small" data-dismiss="modal">确定</button>
                        <button type="button" class="button button-small button-flat" data-dismiss="modal">关闭</button>
                    </div>
                </section>
                <!-- card over -->
            </div>
        </div>
        <!-- page script start -->
        <script type="text/javascript">
            $("#auto_trade").click(function(){
                window.location.href="<?php echo site_url().'admin/auto_trade/index'; ?>";

                //$("#demo-2").modal("show");
                var account1_id =$('#account1_id').val();
                var account2_id =$('#account2_id').val();
                var trade_way =$('input:radio:checked').val();
                var trade_num =$('#trade_num').val();
                $.ajax({
                    type : "GET",
                    url :"<?php echo site_url();?>admin/auto_trade/add",
                    data:{ 
                        account1_id: account1_id,
                        account2_id: account2_id,
                        trade_way: trade_way,
                        trade_num: trade_num,
                    },
                    success : function(data) {
                        //alert(data);
                    }
                });
            });
        </script>
        <!-- page script over -->